<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./OL_SDK/include-openlayers-local.js"></script>
    <script src="./libs/gaode.js"></script>
</head>

<body>
    <button onclick="delFeature()"> 删除要素</button>
    <div id="map">
    </div>
    <script>
        var docLayer = new Zondy.Map.Doc("", "xzd_line", {

        })
        var map = new ol.Map({
            target: "map",
            layers: [gaode, docLayer],
            view: new ol.View({
                projection: 'EPSG:4326',
                center: [114.30, 30.50],
                zoom: 4
            })
        })
        function delFeature() {
            /* 第一个参数 ig server发布的服务名称 */
            var deleteService = new Zondy.Service.EditDocFeature(
                "xzd_line",
                2, {

            });
            deleteService.deletes([2,3], onPntSuccess);
        }
        function onPntSuccess(rlt) {
            var result = rlt;
            if (result) {
                alert("删除要素成功！");
                docLayer.refresh();
            } else {
                alert("删除要素失败！");
            }
        }
    </script>
</body>

</html>